package com.allwees.bs.module.ops.dao;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.allwees.bs.core.model.coupon.constant.PointChangeTypeEnum;
import com.allwees.bs.module.ops.entity.PointActiveDef;
import com.allwees.core.common.constant.EStatus;
import com.allwees.core.dao.mybatis.dao.BaseDao;

public interface PointActiveDefDao extends BaseDao<PointActiveDef> {

    default Integer selectCountByUseType(PointChangeTypeEnum useType) {
        QueryWrapper<PointActiveDef> wrapper = new QueryWrapper<>();
        wrapper.eq("use_type", useType);
        wrapper.eq("status", EStatus.NORMAL.value());
        return selectCount(wrapper);
    }
}
